package com.eff.android.lib.helper;

import com.eff.android.api.model.Model;
import com.eff.android.lib.R;
import com.eff.android.lib.ui.ECustomDialogHelp;

import android.content.Context;
import android.speech.tts.TextToSpeech;
import android.view.View;
import android.widget.TextView;

public class EHelpMenu{
	
	private View v;
	private ECustomDialogHelp dialog;
	private Model model;
	TextToSpeech tts;
	Context context;
	
	public EHelpMenu(View view, Model model){
		v = view;
		this.model = model;
		dialog = new ECustomDialogHelp(v.getContext());
		InitView();
	}
	
	private void InitView() {
		// Show Mean and trans
		String mean = model.getYNghia().toString();
		String trans = model.getPhienAmQuocTe().toString();
		TextView tvMean = (TextView) dialog.findViewById(R.id.meanTextView);
		tvMean.setText(mean);
		TextView tvTrans = (TextView) dialog.findViewById(R.id.transcriptionTextView);
		tvTrans.setText(trans);
	}

	public void Show(){
		dialog.show();
	}
	//
	public void ProcessClickEvent(Context context){
		dialog.ProcessClickedEvent(context, model.getVanBan().toString());
	}

}
